﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using MahApps.Metro.Controls;
using AliyunMobileTestTechnology.ViewModel;
using AliyunMobileTestTechnology.View;

namespace AliyunMobileTestTechnology
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : MetroWindow
    {
        public MainWindow()
        {
            InitializeComponent();
            SettingsViewModel settingsVM = new SettingsViewModel();
            this.DataContext = settingsVM;
            settingsVM.OnShowSettings += new SettingsViewModel.ShowSettingsEventHandler(settingsVM_OnShowSettings);
        }

        private void settingsVM_OnShowSettings()
        {
            SettingsView settingsView = new SettingsView();
            settingsView.DataContext = this.DataContext;
            settingsView.ShowDialog();
        }
    }
}
